package com.zc.chapter41.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class TestConfiguration {

    public TestConfiguration(){
        System.out.println("TestConfiguration 容器启动初始化~~~~~~~~~");
    }

//    @Bean
    @Bean(name = "testBean",initMethod = "start",destroyMethod = "cleanup")
    @Scope("prototype")
    public TestBean testBean(){
        return new TestBean();
    }
}
